<!DOCTYPE HTML>
<html>

<head>
<link rel="stylesheet" href="style.css">
</head>


<?php
if (isset($_GET["name"]))
{
	$search_param = $_GET["name"];
	echo $search_param;
}
?>

<form action="search.php" method="GET">
	Biblia: <br /> <input type="text" name="name"> <br /> <input
		type="submit" value="procurar" />
</form>

<?php

if ( $search_param != null ) {
	$lines = file("NOVO.DAT");

	foreach ($lines as $line_num => $line) {
		if ( strstr($line, $search_param)) {
			echo "<h1>Livro</h1> <br/>";
			$novalinha = str_replace($search_param, "<ttt>".$search_param."</ttt>", $line);
			//echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($novalinha) . "<br />\n";
			echo "Line #<b>{$line_num}</b> : " . $novalinha . "<br />\n";
		}
	}
}


?>





</html>

